package jjoms.aop.controller;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import jjoms.aop.model.GetRankService;
import jjoms.aop.model.RankVO;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


@Controller
@RequestMapping("/report")
public class GetRankController {
	@Resource(name = "getRankServiceImpl")
    private GetRankService getRankService;
	
    public GetRankController() {
		super();
		System.out.println("111");
	}
    @RequestMapping("/test.moja")
    public void test(){
        System.out.println("getRank(report)");       
     }
	@RequestMapping("/getRank.moja")
    public ModelAndView getRank(){
        System.out.println("getRank(report)");
        List<RankVO> list = getRankService.getRank();
        Map<String, List<RankVO>> map = getRankService.getRankToMap();
        System.out.println(map);
        System.out.println("검색된 list = " + list);
        return new ModelAndView("home","map",map);
     }
}
